package com.intelligent.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.intelligent.utils.Result;
import com.intelligent.dto.WarehouseReceiptDetailQueryDTO;
import com.intelligent.service.WarehouseReceiptDetailService;
import com.intelligent.vo.WarehouseReceiptDetailVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 入库单明细控制器
 */
@RestController
@RequestMapping("/warehouse/receipt-detail")
public class WarehouseReceiptDetailController {

    @Autowired
    private WarehouseReceiptDetailService warehouseReceiptDetailService;

    /**
     * 分页查询入库单明细
     */
    @PostMapping("/page")
    public Result<IPage<WarehouseReceiptDetailVO>> pageList(@RequestBody WarehouseReceiptDetailQueryDTO query) {
        IPage<WarehouseReceiptDetailVO> page = warehouseReceiptDetailService.pageList(query);
        return Result.success(page);
    }
}
